/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package lojavirtual.util;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

/**
 *
 * @author 710930
 */
public class SecurityUtils {

   public static String MD5(String text) throws NoSuchAlgorithmException{
        String hashword = "";
        MessageDigest md5 = MessageDigest.getInstance("MD5");
        md5.update(text.getBytes());
        BigInteger hash = new BigInteger(1, md5.digest());
        hashword = hash.toString(32);

        return hashword;
    }


}
